package com.xbk.seckill.order.application.service;

import com.xbk.seckill.common.model.dto.SeckillOrderSubmitDTO;
import com.xbk.seckill.order.application.model.command.SeckillOrderCommand;
import com.xbk.seckill.order.application.model.task.SeckillOrderTask;

/**
 * 提交订单服务
 *
 * @author xiexu
 * @date 2025/3/2 10:06
 */
public interface SeckillSubmitOrderService {

    /**
     * 保存订单
     */
    SeckillOrderSubmitDTO saveSeckillOrder(Long userId, SeckillOrderCommand seckillOrderCommand);

    /**
     * 处理订单任务
     */
    default void handlePlaceOrderTask(SeckillOrderTask seckillOrderTask) {
    }

    /**
     * 检查订单数据有效性
     */
    default void checkSeckillOrder(Long userId, SeckillOrderCommand seckillOrderCommand) {
    }

}
